package org.bot.client.flow;

import com.alibaba.fastjson.JSONObject;
import org.bot.api.util.StringUtil;

public class FlowNodeCheck {

    /**
     * 检查执行器
     */
    public static void checkEvent(JSONObject data){
        if(StringUtil.isNull(data.getString(NodeAttrFiled.EVENT.getValue()))){
            throw new RuntimeException(String.format("节点【%s】未设置执行器",data.getString(NodeAttrFiled.NAME.getValue())));
        }
    }
}
